package forward.Module.Modules.Render;

import forward.api.EventHandler;
import forward.api.Events.Render.EventPostRenderPlayer;
import forward.api.Events.Render.EventPreRenderPlayer;
import forward.api.Value.Mode;
import forward.Module.Module;
import forward.Module.ModuleType;

import java.awt.Color;

import org.lwjgl.opengl.GL11;

public class Chams extends Module {
    public Mode<Enum> mode = new Mode("Mode", "Mode", (Enum[]) ChamsMode.values(), (Enum) ChamsMode.Normal);

    public Chams() {
        super("Chams", new String[]{"seethru", "cham"}, ModuleType.Render);
        this.addValues(this.mode);
        this.setColor(new Color(159, 190, 192).getRGB());
    }

    @EventHandler
    private void preRenderPlayer(EventPreRenderPlayer e) {
        GL11.glEnable((int) 32823);
        GL11.glPolygonOffset((float) 1.0f, (float) -1100000.0f);
    }

    @EventHandler
    private void postRenderPlayer(EventPostRenderPlayer e) {
        GL11.glDisable((int) 32823);
        GL11.glPolygonOffset((float) 1.0f, (float) 1100000.0f);
    }

    public static enum ChamsMode {
        Normal;
    }

}
